Next | Prev | Up | Top | Contents | Index
Assigning the Clock Processor
Every CPU that uses normal IRIX scheduling takes a "tick" interrupt that is the basis of process scheduling. However, one CPU does additional housekeeping work for the whole system, on each of its tick interrupts. You can specify which CPU has these additional duties using the privileged mpadmin command (see the mpadmin(1) reference page). For example, to make CPU 0 the clock CPU (a common choice), use
mpadmin -c 0
The equivalent operation from within a program uses sysmp() as shown in Example 6-7 (see also the sysmp(2) reference page).
Example 6-7 : Setting the Clock CPU
#include <sys/sysmp.h>
int setClockTo(int cpu)
{
int ret = sysmp(MP_CLOCK,cpu);
if (-1 == ret) perror("sysmp(MP_CLOCK)");
return ret;
}
Next | Prev | Up | Top | Contents | Index